/*
 * Copyright 2012-2020 the original author or authors.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * @author lzhoumail@126.com/zhouli
 * Git http://git.oschina.net/zhou666/spring-cloud-7simple
 */

package top.btcmarket.zipkin;

import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;

import zipkin.server.EnableZipkinServer;

/**
 * 查看加载的本地文件的配置信息
 * http://127.0.0.1:1111/btcmarket-zipkin-config/dev
 * 
 * 
 * @ClassName:  ZipkinServerApplication   
 * @Description:TODO(这里用一句话描述这个类的作用)   
 * @author: pengwei
 * @date:   2017年11月13日 下午6:15:58   
 *
 */
@SpringBootApplication
@EnableCircuitBreaker
@EnableZipkinServer
@EnableDiscoveryClient
public class ZipkinApplication {

	public static void main(String[] args) throws Exception {
		new SpringApplicationBuilder(ZipkinApplication.class).web(true).run(args);
	}
	
	@LoadBalanced
	@Bean
	RestTemplate restTemplate() {
		return new RestTemplate();
	}

}
